<template>
	<div>
		<!-- 指定ref属性替代 id=名字 -->
		<h3 ref = "demo">Ref对象</h3>
	</div>
</template>

<script>
	export default{
		mounted() {
			//获取ref属性名为demo的Dom元素
			console.log(this.$refs.demo)
			this.$refs.demo.style.color = "pink"
		}
	}
</script>

<style>
</style>
